package pack_cone;

import java.text.DecimalFormat;

import pack_circle.Circle;

class Cone {
	public static double volume(double r, double h) {
		DecimalFormat df = new DecimalFormat("0.00000000000000000000");
		Double d = Double.parseDouble(df.format((double) 1 / 3));
		return Circle.area(r) * h * d;

	}

	public static double area(double r, double h) {
		double l = Math.sqrt((r * r) + (h * h));
		return Circle.area(r) + Math.PI * r * l;
	}
}

public class Text {
	public static void main(String[] args) {
		System.out.println("S=" + Cone.area(3, 4));
		System.out.println("V=" + Cone.volume(3, 4));

	}
}
